/*
 * @Description:
 * @Version: 2.0
 * @Autor: huangfu
 * @Date: 2020-09-14 16:21:22
 * @LastEditors: huangfu
 * @LastEditTime: 2020-10-31 19:02:56
 */
let routes = []
const routerContext = require.context('./model', true, /\.js$/)
routerContext.keys().forEach(route => {
    if (route.startsWith('./index')) {
        return
    }
    const routerModule = routerContext(route)
    routes = [...routes, ...(routerModule.default || routerModule)]
})

export default routes